// 库存管理接口
import request from "@/common/request.js";
const api = {
  machining: "/machining/",
  machining_in: "/machining_in/",
  machining_product: "/machining_product/",
  machining_in_product:'/machining_in_product/',
  warehouse: "/warehouse/",
};

export function get_machining(params) {
  return request({
    url: api.machining,
    method: "get",
    params,
  });
}

export function get_machining_product(params) {
  return request({
    url: api.machining_product,
    method: "get",
    params,
  });
}



export function get_machining_in(params) {
  return request({
    url: api.machining_in,
    method: "get",
    params,
  });
}

export function get_machining_in_product(params) {
  return request({
    url: api.machining_in_product,
    method: "get",
    params,
  });
}

export function machining_in_detail(id) {
  return request({
    url: api.machining_in + id,
    method: "get",
  });
}

export function post_machining_in(data) {
  return request({
    url: api.machining_in,
    method: "post",
    data,
  });
}

export function patch_machining_in(data, id) {
  return request({
    url: api.machining_in + id + "/",
    method: "patch",
    data,
  });
}

export function delete_machining_in(id) {
  return request({
    url: api.machining_in + id + "/",
    method: "delete",
  });
}
